﻿@using System.Threading
@using FikriKibar.Globalization
@using FikriKibar.UI.WebCommon.Helpers
@using FikriKibar.Entities.Composite.UserModels
@model AddModel
@{
    ViewBag.Title = Resources.NewRecord;
    Layout = "~/Views/Shared/ContentLayout.cshtml";
}


<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">@Resources.UserManagement</h1>
        </div>
    </div>
    <div class="row">

        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    @Resources.NewRecord
                </div>
                <div class="panel-body">
                    @using (Html.BeginForm("Add", "User", FormMethod.Post, new { @role = "form" }))
                    {

                        <div class="form-group">
                            <label class="control-label" for="SelectedLanguageCode">@Resources.Language</label>
                            @Html.FikriKibarDropDownListFor(m => m.SelectedLanguageCode, new SelectList(Model.LanguageList, "LanguageCode", "LanguageName", Thread.CurrentThread.CurrentCulture), new { @class = "form-control" })
                        </div>

                        <div class="form-group">
                            <label class="control-label" for="User_Username">@Resources.Username</label>
                            @Html.FikriKibarTextBoxFor(m => m.User.Username, new { @class = "form-control", @maxlength = 32 })
                            @Html.ValidationMessageFor(m => m.User.Username)
                        </div>

                        <div class="form-group">
                            <label class="control-label" for="User_Password">@Resources.Password</label>
                            @Html.FikriKibarPasswordFor(m => m.User.Password, new { @class = "form-control", @maxlength = 32 })
                            @Html.ValidationMessageFor(m => m.User.Password)
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="User_ConfirmPassword">@Resources.ConfirmPassword</label>
                            @Html.FikriKibarPasswordFor(m => m.User.ConfirmPassword, new { @class = "form-control", @maxlength = 32 })
                            @Html.ValidationMessageFor(m => m.User.ConfirmPassword)
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="User_Email">@Resources.Email</label>
                            @Html.FikriKibarEmailFor(m => m.User.Email, new {@class = "form-control", @maxlength = 32})
                            @Html.ValidationMessageFor(m => m.User.Email)
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="User_FirstName">@Resources.FirstName</label>
                            @Html.FikriKibarTextBoxFor(m => m.User.FirstName, new { @class = "form-control", @maxlength = 32 })
                            @Html.ValidationMessageFor(m => m.User.FirstName)
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="User_LastName">@Resources.LastName</label>
                            @Html.FikriKibarTextBoxFor(m => m.User.LastName, new { @class = "form-control", @maxlength = 32 })
                            @Html.ValidationMessageFor(m => m.User.LastName)
                        </div>

                        <div class="form-group">
                            <div class="checkbox">
                                <label>
                                    @Html.CheckBoxFor(m => m.User.IsApproved) @Resources.Approve
                                </label>
                            </div>

                        </div>


                        <button class="btn btn-primary"><i class="fa fa-save"></i>&nbsp;@Resources.Save</button>
                    }
                </div>

            </div>

            <div class="row">
                <div class="col-lg-12 text-center">
                    @Html.FikriKibarAlertFor(m => m.Message, "div", Model.Message, new { @class = "alert alert-danger" })
                </div>
            </div>
        </div>
    </div>
</div>
